# Updating an existing Account Membership

This endpoint returns structured Account Membership objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the `results` array
and will be indexed by ID in the `account_memberships` top-level JSON key.
Please see our [Response Format](#section/Response-Format) section for more information.

Endpoint: PUT /account_memberships/{id}
Version: 1.0.0

## Path parameters:

  - `id` (integer, required)
    The ID of the Model.

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the `include` param, e.g. `include=association1,association2`.
- `backup_approver_associations` (BackupApproverAssociation) - Retrieves the [backup approver associations](/tag/Backup-Approver-Associations) for the user this account membership is for, which represent a backup time approver for a specific date range. The response will include `backup_approver_association_ids`, which references the data in the `backup_approver_associations` top-level key.
- `cost_rates` (CostRate) - Retrieves all the cost rates in different currencies for the user this account membership is for. The response will include `cost_rate_ids`, which references the data in the `cost_rates` top-level key.
- `default_role` (Role) - Retrieves the default role, if any, for this account membership. The response will include `default_role_id`, which references the data in the `roles` top-level key.
- `effective_workweek` (Workweek) - Retrieves the workweek that is in effect today for the user this account membership is for. The response will include `effective_workweek_id`, which references the data in the `workweeks` top-level key.
- `future_billable_utilizations` (BillableUtilization) - Retrieves the future billable utilizations for the user this account membership is for. The response will include `future_billable_utilization_ids`, which references the data in the `billable_utilizations` top-level key.
- `managees` (User) - Retrieves the direct reports of the user this account membership is for. The response will include `managee_ids`, which references the data in the `users` top-level key.
- `manager` (User) - Retrieves the manager of the user this account membership is for. The response will include `manager_id`, which references the data in the `users` top-level key.
- `possible_managees` (User) - Retrieves a list of users who can become the direct reports of the user this account membership is for. The response will include `possible_managee_ids`, which references the data in the `users` top-level key.
- `possible_managers` (User) - Retrieves a list of users who can be set as the manager of the user this account membership is for. The response will include `possible_manager_ids`, which references the data in the `users` top-level key.
- `skill_memberships` (SkillMembership) - Retrieves the skill memberships for the user this account membership is for, which represent skills assigned to a user. The response will include `skill_membership_ids`, which references the data in the `skill_memberships` top-level key.
- `user` (User) - Retrieves the user for this account membership. The response will include `user_id`, which references the data in the `users` top-level key.

  - `optional_fields` (array)
    Allows you to request one or more optional fields as an array.

## Request fields (application/json):

  - `account_membership` (object)

  - `account_membership.bill_rate_in_cents` (integer)
    The default billing rate, in cents, for the user in a workspace on this account.

  - `account_membership.cost_rate_in_cents` (integer)
    The default cost rate, in cents, for the user in a workspace on this account.

  - `account_membership.default_role_id` (integer)
    The internal ID for the role of this user on this account.

  - `account_membership.permission` (string)
    The user's permission level on the account. Valid values are 'administrator', 'reports_viewer', 'reports_viewer_with_cost', 'project_lead', 'project_creator', 'punch_clock', 'external_collaborator' or 'collaborator'.

  - `account_membership.billability_target` (integer)
    Value for setting the user's billability target.

  - `account_membership.default_read_only` (boolean)
    Whether the user is always read-only in workspaces.

  - `account_membership.manager_id` (integer)
    The User ID of the user's manager.

  - `account_membership.manager_can_approve` (boolean)
    Whether the user's named manager can approve their time and expenses.

  - `account_membership.manager_can_edit_skills` (boolean)
    Whether the user's named manager can edit their skills.

  - `account_membership.should_show_alert_on_timesheet_submission` (boolean)
    Show an alert on a user's timesheet.

  - `account_membership.change_role_option` (string)
    Select 'update_with_new_role', 'add_another_role', or 'keep_existing_role'. If no option is selected another role will be added.

  - `account_membership.enforce_workweek_minimum_on_timesheet_submission` (boolean)
    If true, the user is required to submit timesheets equal to or greater than their workweek hours.

  - `account_membership.enforce_workweek_maximum_on_timesheet_submission` (boolean)
    If true, the user is required to submit timesheets equal to or less than their workweek hours.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 403 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 404 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

